The narrow gap between facing end walls adjacent first and second railway rails must be filled accurately and rapidly with molten metal if an electric arc welding process is to be successfully used in the field. To accomplish this objective, technology has advanced to the concept of moving the electric arc welding torch back and forth in the gap by a robotic mechanism. In the past, the movement of an electric arc welding torch is controlled by a robotic mechanism by use of an executive software program using somewhat low level language. The program is created by moving the torch in the desired path and recording this movement in program language so that the movement can be duplicated when the next rail joint is being filled. The creation of a computer software program for controlling the movement of a robotic mechanism has resulted in somewhat unsuccessful welding procedures that demands a substantial amount of operator attention. When an executive program is generated by moving a torch in the gap and periodically storing the movement by a software program, difficulty has been experienced when using the program in the field to weld a joint. The narrow gap between the rails is not uniform from one joint to the next and is not ideal for any joint. The gap is formed in the field by a rotary cutting wheel slicing off the end of one rail and then the end of another rail. These rails are then positioned to define the gap. These roughly cut rails are positioned by less than a precise procedure. The two end surfaces are not necessarily parallel. The program heretofore used for moving the arc welding torch for filling the gap has been fixed and based upon ideal positioning of the end walls and a precise spacing of these walls. Consequently, robotic control and automatic welding of the gap between spaced rails in the field has not been universally successful from one gap to the next. The limitation in the past has been the use of a computer software program which is based upon ideal movements of the torch in an ideal, but imaginary, gap. Hopefully the ideal gap is close to the actual gap being filled during the arc welding process. An unsuccessful filling operation results in a rejected joint. In the field often such rejection involves rerouting trains to avoid the work area where the joint is being filled. This is unacceptable and somewhat mitigates against successful implementation of a computer controlled robotic mechanism for filling the joint between spaced rails. The spacing of the end wall is not always the same; consequently, use of an ideal torch movement is not always successful in providing a satisfactory weld joint.